Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __getattr__ support to PR 2904 #2906

Merged
merged 6 commits into from
Oct 13, 2023
Merged

Add __getattr__ support to PR 2904 #2906

merged 6 commits into from
Oct 13, 2023

Conversation

Andrew-S-Rosen
Copy link
Contributor

@Andrew-S-Rosen Andrew-S-Rosen commented Oct 12, 2023

Description

@benclifford: This adds __getattr__ support to #2904. If all goes as it does locally for me, then these tests should pass.

I also added tests for __getitem__ with list and tuple results.

Edit: Looks like parsl/tests/test_python_apps/test_lifted.py tests passed, but I'm not sure what the other failures are from.

@Andrew-S-Rosen Andrew-S-Rosen changed the base branch from master to benc-lifted-dict October 12, 2023 22:39
@Andrew-S-Rosen Andrew-S-Rosen changed the title Add __getattr__ to PR 2904 Add __getattr__ support to PR 2904 Oct 12, 2023
@benclifford benclifford merged commit 90c0c17 into Parsl:benc-lifted-dict Oct 13, 2023
0 of 4 checks passed
@benclifford
Copy link
Collaborator

I was thinking about how maybe this should try to avoid methods beginning with __ or even just _ to avoid accidentally implementing screwed up versions of various protocols.

@Andrew-S-Rosen
Copy link
Contributor Author

I do think some sort of guardrails could be useful. In addition, should we also explicitly avoid methods that are already part of the AppFuture, perhaps?

@Andrew-S-Rosen Andrew-S-Rosen deleted the asr-benc-lifted-dict branch October 13, 2023 01:17
@benclifford
Copy link
Collaborator

I think __getattr__ will only get called for attributes that don't exist in some more fundamental way - that's how .result still works (assuming it does)

@Andrew-S-Rosen
Copy link
Contributor Author

Ah, of course. Yes yes! You are correct 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants